<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/taglib.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="/common/public.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}/css/main.css">
<title>${page.pageName}</title>
<script type="text/javascript">
var Action = {};
window._Link = function( pageId , parameters ){
	var params  = parameters || {};
	if( pageId ){
		var url = ctx + "/Page!init.action?page=" + pageId + "&" + jQuery.param(params);
		parent.Win.win({message:url,width:800,height:600,title:"",iframe:true,maxBtn:true,minBtn:true});
	}else{
		Win.error("配置错误,缺少#pageId#参数!");
	}
};
</script>
${page.resultScript}
</head>
<body style="margin:0">
<c:choose>
<c:when test="${page.pageUrl == null}">
  <c:set value="${ctx}/query/list.do" var="action"/>
</c:when>
<c:otherwise>
  <c:set value="${ctx}/${page.pageUrl}" var="action"/>
</c:otherwise>
</c:choose>
<form name="QryForm" action="${action}" method="post"/>
<input type="hidden" id="pageId" name="pageId" value="${page.pageId}" />
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td>
		<c:choose>
			<c:when test="${page.pageTypeId == '1'}">
				<grid:table var="${page.varName}" data="list" tableConfig="pk:${page.tableConfig.tableId}">
					<grid:param name="page" value="${page.isPage}"/>
					<grid:param name="action" value="${action}"/>
					<grid:param name="cellCustom" value="${page.cellCustom}"/>
					<grid:param name="rowCustom" value="${page.rowCustom}"/>
					<grid:param name="toolbar" value="${page.toolbar}"/>
					<grid:param name="lockHead" value="${page.isLockHead}" />
				</grid:table>
			</c:when>
			<c:when test="${page.pageTypeId == '2'}">
				<grid:table var="${page.varName}" data="list" tableConfig="pk:${page.tableConfig.tableId}">
					<grid:param name="page" value="${page.isPage}"/>
					<grid:param name="action" value="${action}"/>
					<grid:param name="cellCustom" value="${page.cellCustom}"/>
					<grid:param name="rowCustom" value="${page.rowCustom}"/>
					<grid:param name="toolbar" value="${page.toolbar}"/>
					<grid:param name="lockHead" value="${page.lockHead}" />
				</grid:table>
			</c:when>
			<c:when test="${page.pageTypeId == '3'}">
				<grid:table var="${page.varName}" data="list" tableConfig="pk:${page.tableConfig.tableId}">
					<grid:param name="page" value="${page.isPage}"/>
					<grid:param name="action" value="${action}"/>
					<grid:param name="cellCustom" value="${page.cellCustom}"/>
					<grid:param name="rowCustom" value="${page.rowCustom}"/>
					<grid:param name="toolbar" value="${page.toolbar}"/>
					<grid:param name="lockHead" value="${page.lockHead}" />
				</grid:table>
			</c:when>
			<c:otherwise>
			   <!--<h1>error</h1>-->
			</c:otherwise>
		</c:choose>
	</td>
  </tr>
</table>
</form>
<%@include file="/common/footer.jsp"%>
</body>
</html>